const a = { name: '蜗牛' }
const b = a
const c = { name: '蜗牛'}

// 判断两个对象是否相等
console.log(Object.is(a, b));

Object.prototype.my_is = function(x, y) {
    
    if (x === y) {
        // 防止为-0，+0
        return x !== 0 || 1/x === 1/y
    }
    // 防止为NaN
    return x !== x && y !== y
}

console.log(Object.my_is(NaN, NaN)); // true